import hmac
import hashlib


class Message:

    def __init__(self, secret):
        self._secret = secret

    def _verify_message(self, msg, signature):
        _hmac = hmac.new(bytes(self._secret), bytes(msg), digestmod=hashlib.sha256)
        digest = _hmac.hexdigest().lower()
        return digest == signature.lower()
